<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href='<?php echo base_url()?>'>
<link rel="stylesheet" type="text/css" href="public/common/css/common.css"/>
<link rel="stylesheet" type="text/css" href="public/admin/css/admin.css"/>
<script src="public/common/js/jquery.js"></script>
<script>
function delete_group(obj,group_id)
{
	$.post("<?php echo site_url('admin/user_admin/delete_group')?>",{group_id:group_id},function(result){
		if(result == '1')
		{
			$(obj).parent().parent().remove();
		}else{
			alert('删除失败！');
		}
	});
}
</script>
</head>
<body>
	<div class="body">
		<?php echo $this->position->get_position();?>
		<div class="body_center">
				<table class="table">
					<tr><th>组ID</th><th>组名称</th><th>组描述</th><th>操作</th></tr>
					<?php foreach($admin_group->result() as $value):?>
					<tr>
						<td align="center"><?php echo $value->group_id?></td>
						<td align="center"><?php echo $value->group_name?></td>
						<td align="center"><?php echo $value->group_desc?></td>
						<td align="center"><a href="<?php echo site_url('admin/user_admin/group_edit/'.$value->group_id)?>">修改</a> | <a href="javascript:void(0)" onclick="delete_group(this,<?php echo $value->group_id?>)">删除</a></td>
					</tr>
					<?php endforeach;?>
				</table>
		</div>
	</div>
</body>
</html>